package com.spring.springboot.jpa;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.spring.springboot.entity.UserEntity;

/**
*@author LSY
*Time: 2018年12月7日下午4:28:38
*
*
*/
public interface UserJPA extends JpaRepository<UserEntity, Long>, JpaSpecificationExecutor<UserEntity>,Serializable
{

	@Query(value = "select * from user_info where ui_user_name = ?1", nativeQuery = true)
	public UserEntity getOne(String userName);
	
	public List<UserEntity> findAllByBalance(BigDecimal balance, Pageable pageable);
}
